#include "unp.h"

SigFunc* Signal(int signum, SigFunc* func) {
	struct sigaction act, oact;
	act.sa_handler = func;
	sigemptyset(&act.sa_mask);
	act.sa_flags = 0;

	if(sigaction(signum,&act,&oact)<0) return SIG_ERR;
	return oact.sa_handler;
}
